﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.IO;
using System.Collections;
using Metaspec;
using AbstraX.Contracts;
using AbstraX.Bindings;

namespace AbstraX.Contracts
{
    public interface IBuildFilter
    {
        string Name { get; }
        bool Enabled { get; set; }
        void OnGenerateFrom(List<IBindingsTree> bindings, ref bool abortGeneration);
        void OnStepsAdded(List<IPipelineStep> steps);
        void OnStepPreGenerate(IPipelineStep step, Dictionary<string, IElementBuild> builds, DirectoryInfo workspaceDirectory, ref bool abortStep);
        void OnStepPreGenerate(IPipelineStep step, ICodeGenerationPackage incomingPackage, ref bool abortStep);
        void OnStepPostGenerate(IPipelineStep step, ICodeGenerationPackage outgoingPackage);
        void OnOutput(object sender, EventArgs eventArgs);
        void OnGeneratorFileWithBuildPreBuildHandler(ref IGenerator generator, ref IElementBuild build, ref FileInfo fileInfo, ref string _namespace, ref Dictionary<string, object> extraValues, ref bool skipBuildFile, ref bool abortBuild);
        void OnGeneratorFileWithListPreBuildHandler(ref IGenerator generator, ref FileInfo fileInfo, ref string _namespace, ref IEnumerable list, ref bool skipBuildFile, ref bool abortBuild);
        void OnGeneratorFileWithBuildPostBuildHandler(IGenerator generator, IElementBuild build, ref FileInfo fileInfo, string _namespace, Dictionary<string, object> extraValues, List<ICsFile> codeFiles, ref string output);
        void OnGeneratorFileWithListPostBuildHandler(IGenerator generator, ref FileInfo fileInfo, string _namespace, IEnumerable list, List<ICsFile> codeFiles, ref string output);
        void OnStepAborted(IPipelineStep step);
        void OnGenerationAborted();
        void OnBuildAborted(IGenerator generator, FileInfo lastFileInfo);
        void OnBuildFileSkipped(IGenerator generator, FileInfo fileInfo);
    }
}
